
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type AppVersionRequest struct {

	Version string `json:"version" form:"version"`

	Platform string `json:"platform" form:"platform"`

	Info string `json:"info" form:"info"`

	Url string `json:"url" form:"url"`

	IsForce string `json:"is_force" form:"is_force"`

	IsNew string `json:"is_new" form:"is_new"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *AppVersionRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *AppVersionRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"version": "required",

		"platform": "required",

		"info": "required",

		"url": "required",

		"is_force": "required",

		"is_new": "required",

		"is_del": "required",

		"add_time": "required",

	}
}

func (r *AppVersionRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AppVersionRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AppVersionRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
